Front-End Reactive Architectures: Explore the Future of the Front-End using Reactive JavaScript Frameworks and Libraries by Luca Mezzalira

Front-End Reactive Architectures: Explore the Future of the Front-End using Reactive JavaScript Frameworks and Libraries by Luca Mezzalira

Author:Luca Mezzalira [Luca Mezzalira]
Language: eng
Format: epub
Tags: JavaScript
Publisher: Apress
Published: 2018-01-03T22:00:00+00:00


The first thing is to create a stream (periodicStream constant) that emits every second a random number.

Then every time we are adding a new listener to the main stream, each listener receives the value emitted by the periodicStream.

Checking the output on the browser’s console we can see how the stream works; remember that we said any stream in XStream is a hot one and multicast. Therefore we will have just one producer that won’t be re-created but every time a new listener is subscribing, we receive the value emitted from that moment onward (Figure 3-11).



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.